package com.lwm.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author liweimin
 * @date 2020/12/14 14:21
 * @description Ribbon自定义规则配置类
 */
@Configuration
public class MySelfRule {
    @Bean
    public IRule myRule(){
        // 规则为随机
        return new RandomRule();
    }
}
